# Contributor: Bhushan Shah <bshah@kde.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kpeoplevcard
pkgver=0.1
pkgrel=2
pkgdesc="KPeople backend using vcard storage"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://phabricator.kde.org/source/kpeoplevcard"
license="GPL-2.0-only OR GPL-3.0-only"
depends="kirigami2"
makedepends="extra-cmake-modules qt5-qtbase-dev kpeople-dev kcontacts-dev"
source="https://download.kde.org/stable/kpeoplevcard/$pkgver/kpeoplevcard-$pkgver.tar.xz"
subpackages="$pkgname-dev"
options="!check" # No tests

prepare() {
	default_prepare

	mkdir "$builddir"/build
}

build() {
	cd "$builddir"/build
	cmake "$builddir" \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	make
}

check() {
	cd "$builddir"/build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	cd "$builddir"/build
	DESTDIR="$pkgdir" make install
}
sha512sums="9f11ee768d1ddce1f03f41b604180078c0315eb8b9f0118dd99eba65333400b0a0ed12ab1e08ebce3c6c0a2c93563e5c3e832a0cd458d6ea296bd64eeb9413e7  kpeoplevcard-0.1.tar.xz"
